import UIKit

// code that uses UIGestureRecognizers must never call these
extension QKC where AA :UIGestureRecognizer {
	// the current state of the gesture recognizer. can only be set by subclasses of UIGestureRecognizer, but can be read by consumers
		// if a touch isn't part of this gesture it can be passed to this method to be ignored. ignored touches won't be cancelled on the view even if cancelsTouchesInView is YES
    open func ignore_qk_f(_ touch: UITouch, for event: UIEvent) -> QKC<AA,YY,ZZ, UITouch>{
		 self +^ self.value.ignore(touch, for:event) +^ touch
	}

    @available(iOS 9.0, *)
    open func ignore_qk_f(_ button: UIPress, for event: UIPressesEvent) -> QKC<AA,YY,ZZ, UIPress>{
		 self +^ self.value.ignore(button, for:event) +^ button
	}

	// after this is received all remaining active touches will be ignored (no further updates will be received for touches that had already begun but haven't ended)
    open func reset_qk_f() -> QKC<AA,YY,ZZ,Void>{
		 self +^ self.value.reset()
	}

	// for example, a UITapGestureRecognizer never prevents another UITapGestureRecognizer with a higher tap count
    open func canPrevent_qk_f(_ preventedGestureRecognizer: UIGestureRecognizer) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.canPrevent(preventedGestureRecognizer)
	}

    open func canBePrevented_qk_f(by preventingGestureRecognizer: UIGestureRecognizer) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.canBePrevented(by:preventingGestureRecognizer)
	}

	// same behavior as the equivalent delegate methods, but can be used by subclasses to define class-wide failure requirements
    @available(iOS 7.0, *)
    open func shouldRequireFailure_qk_f(of otherGestureRecognizer: UIGestureRecognizer) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.shouldRequireFailure(of:otherGestureRecognizer)
	}

    @available(iOS 7.0, *)
    open func shouldBeRequiredToFail_qk_f(by otherGestureRecognizer: UIGestureRecognizer) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.shouldBeRequiredToFail(by:otherGestureRecognizer)
	}

	// same behavior as the equivalent delegate method
    @available(iOS 13.4, *)
    open func shouldReceive_qk_f(_ event: UIEvent) -> QKC<AA,YY,ZZ,Bool>{
		 self +^ self.value.shouldReceive(event)
	}

	// UIGestureRecognizers receive touches before the view to which the touch was hit-tested
    open func touchesBegan_qk_f(_ touches: Set<UITouch>, with event: UIEvent) -> QKC<AA,YY,ZZ, Set<UITouch>>{
		 self +^ self.value.touchesBegan(touches, with:event) +^ touches
	}

    open func touchesMoved_qk_f(_ touches: Set<UITouch>, with event: UIEvent) -> QKC<AA,YY,ZZ, Set<UITouch>>{
		 self +^ self.value.touchesMoved(touches, with:event) +^ touches
	}

    open func touchesEnded_qk_f(_ touches: Set<UITouch>, with event: UIEvent) -> QKC<AA,YY,ZZ, Set<UITouch>>{
		 self +^ self.value.touchesEnded(touches, with:event) +^ touches
	}

    open func touchesCancelled_qk_f(_ touches: Set<UITouch>, with event: UIEvent) -> QKC<AA,YY,ZZ, Set<UITouch>>{
		 self +^ self.value.touchesCancelled(touches, with:event) +^ touches
	}

    @available(iOS 9.1, *)
    open func touchesEstimatedPropertiesUpdated_qk_f(_ touches: Set<UITouch>) -> QKC<AA,YY,ZZ, Set<UITouch>>{
		 self +^ self.value.touchesEstimatedPropertiesUpdated(touches) +^ touches
	}

    @available(iOS 9.0, *)
    open func pressesBegan_qk_f(_ presses: Set<UIPress>, with event: UIPressesEvent) -> QKC<AA,YY,ZZ, Set<UIPress>>{
		 self +^ self.value.pressesBegan(presses, with:event) +^ presses
	}

    @available(iOS 9.0, *)
    open func pressesChanged_qk_f(_ presses: Set<UIPress>, with event: UIPressesEvent) -> QKC<AA,YY,ZZ, Set<UIPress>>{
		 self +^ self.value.pressesChanged(presses, with:event) +^ presses
	}

    @available(iOS 9.0, *)
    open func pressesEnded_qk_f(_ presses: Set<UIPress>, with event: UIPressesEvent) -> QKC<AA,YY,ZZ, Set<UIPress>>{
		 self +^ self.value.pressesEnded(presses, with:event) +^ presses
	}

    @available(iOS 9.0, *)
    open func pressesCancelled_qk_f(_ presses: Set<UIPress>, with event: UIPressesEvent) -> QKC<AA,YY,ZZ, Set<UIPress>>{
		 self +^ self.value.pressesCancelled(presses, with:event) +^ presses
	}

}

